import Vuex from 'vuex'
import Vue from 'vue'
Vue.use(Vuex);

const store = new Vuex.Store({
	state:{
		phone:'',
		address:'',
		medicine:'',
		src:'',
		content:'',
		name:'123',
		open_id:'omEeg6dniqfYBqDYZ5NZHAoRsFBk',
		id:null,
		type:null,
		pay:1,
		doctor_name:'',
		userImage:'../../static/logo.png',
		userName:'无',
		bb:'',
		Visit:[],
		ip:''
	},
	mutations:{
		dayn(state,params){
			console.log(12312312321321)
			console.log(state)
			console.log(params)
		},
		fixsrc(state,params){
			store.state.src = 'http://124.223.168.50:8000' + params.image
			store.state.name = params.name
			store.state.content = params.brief
			store.state.id = params.id
			console.log(state)
			console.log(params)
		},
		getphone(state,params){
			state.open_id = params
			console.log(params)
			console.log(state)
		},
		get(state,params) {
			state.type = params
			console.log(params)
			console.log(state)
		},
		getuser(state,params){
			// state.userImage = params.headimgurl
			// state.userName = params.nickname
			state.open_id = params.data.data.openid
		},
		order(e,b){
			e.Visit.push(b)
		}
	},
	actions:{
		
	}
})
export default store